// 蜂窝蜜造平台生成代码，如手工更改，请添加到 .beeignore 忽略生成

package com.fowo.api.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.fowo.api.common.model.OptionItem;
import com.fowo.api.entity.BdRate;
import com.fowo.api.model.bd.rate.BdRateItemVo;
import com.fowo.api.model.bd.rate.BdRateSearchParamPo;
import com.fowo.api.model.bd.rate.BdRateSelectBdRateDetailParam;
import com.fowo.api.model.bd.rate.BdRateSelectBdRateDetailResult;
import com.fowo.api.model.bd.rate.BdRateVo;
import java.util.Date;
import java.util.List;
import java.util.Map;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

@Mapper
public interface BdRateMapper extends BaseMapper<BdRate> {
  Page<BdRateItemVo> pageSearch(
    @Param("page") Page page,
    @Param("search") BdRateSearchParamPo search
  );
  List<OptionItem<BdRateItemVo>> searchOptions(
    @Param("search") BdRateSearchParamPo search
  );
  List<BdRateItemVo> search(@Param("search") BdRateSearchParamPo search);
  Date searchLastUpdateTime(@Param("search") BdRateSearchParamPo search);
  /**
   * 搜索满足条件的所有记录的编号列表
   * @param search 搜索参数
   * @return 编号列表
   */
  List<Long> searchIds(@Param("search") BdRateSearchParamPo search);
  /**
   * 搜索满足条件的记录数量
   * @param search 搜索参数
   * @return 记录数量
   */
  Long searchCount(@Param("search") BdRateSearchParamPo search);
  Long getIdByName(@Param("name") String name);

  List<Long> getIdsByName(@Param("list") List<String> list);

  String getNameById(@Param("id") Long id);

  List<Map<String, Object>> getNameByIds(@Param("ids") List<Long> ids);
  BdRateVo selectVoById(@Param("id") Long id);
  /**
   * 维护汇率展开表
   */
  void upkeepBdRateDetail();
  /**
   * 根据币种和月份获取汇率信息
   */
  BdRateSelectBdRateDetailResult selectBdRateDetail(
    BdRateSelectBdRateDetailParam param
  );
}
